<template>
  <div>
    <table>
      <tr v-for="(g,index) in goods" v-bind:key="index">
          <td>{{g.id}}</td>
          <td>{{g.name}}</td>
      </tr>
    </table>
  </div>
</template>
<script>
export default{
  data(){
    return{
      goods:[]
    }
  },
  created(){
    //发送请求
    this.axios.get(this.baseUrl+"goods/all").then(res=>{
      this.goods=res.data.data;
    })
  }
}
</script>